import request from '@/utils/request'

// 查询事先告知书列表
export function listPenalty(query) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/list',
    method: 'get',
    params: query,
  })
}

// 查询事先告知书审批详细
export function getPenalty(id) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/' + id,
    method: 'get',
  })
}

// 新增事先告知书审批
export function addPenalty(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult',
    method: 'post',
    data: data,
  })
}

// 修改事先告知书审批
export function updatePenalty(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult',
    method: 'put',
    data: data,
  })
}

// 删除事先告知书审批
export function delPenalty(id) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/' + id,
    method: 'delete',
  })
}

// 预览

export function previewPenalty(params) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addPenaltyFiles(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportPenalty(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 导出送达回证
export function receipEexportPenalty(data) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/receipEexport',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/penaltyadvancenoticeresult/getContent?caseId=' + id,
    method: 'get',
  })
}
